473,425 Members | 1,917 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,425 software developers and data experts.

how to hide query string

5
i have a page1 and page2.

in the page on a have this php code :

Expand|Select|Wrap|Line Numbers
  1.  
  2. $query = "select code, name from mscustomer";
  3.  
  4. $rs = mysql_query($query);
  5.  
  6. while($row = mysql_fetch_array($rs))
  7. {
  8.      echo "<a href=\"detail.php?id=".$row['code']."\">".$row['name']."</a>";
  9. }
  10.  
  11.  
example data :

justin
harry
david

when i click justin it will redirect to page 2, but i don't want to show the querystring url in page 2 -> detail.php

but when in page2 i use echo $id
it will print K01

how can i do that
May 10 '07 #1
3 2259
You need to explain this better!
May 10 '07 #2
I think what your getting at is when you're on the second page you are using the ID and you want to get the name,

What you need to do on the second page is another query:

$sql = "select * from table where id = ". $_GET['id'];

and from that get the information you need to display!
May 10 '07 #3
pbmods
5,821 Expert 4TB
[PHP]$sql = "select * from table where id = ". $_GET['id'];[/PHP]
Should be:

[PHP]$sql = "select * from table where id = ". addslashes($_GET['id']);[/PHP]

to prevent an SQL injection attack.
May 10 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: ST Wong | last post by:
Hi, all, We've an application that requires passing username and password as query string to an URL, e.g. http://myapp.com?username=abc&password=pwd. This string will be displayed on browser...
2
by: Mark | last post by:
Hi all, I have a pop-up which has several command buttons which allow users to run a few stored query's. Having the query's displayed as report is not an option due to several reasons. My problem...
7
by: Mark | last post by:
Hi All, I have a report which is based on a query which is used to produce QC check sheets. I have quite a few text boxes which are used to display questions depending on the value of one...
4
by: -=franz=- | last post by:
is there a way to hide the query string? i receive a variable with a querystring from an external domain. i need to hide it cause it's a important data. thanks franz from italy
2
by: bhavik | last post by:
hi i want to know how to hide the values in query string in ASP.net. here i want to send the values from one page to another page through query string with out explicitly visible the values in...
2
by: prefersgolfing | last post by:
Is there a way to hide the query string in the address bar?
3
by: =?Utf-8?B?Um9iZXJ0IENoYXBtYW4=?= | last post by:
Hi, I have a GridView with a fixed number of columns being returned from a SQL query and each having a simple template: <asp:TemplateField HeaderText="Allocations"> <edititemtemplate>...
22
karthickkuchanur
by: karthickkuchanur | last post by:
I want to hide the following value to hide when i call the url <script> function callEmployeeEducationalHistory() { ...
9
by: deepikashalini | last post by:
Hi, im new to html. i don't know how to hide query string in url. Example: http://localhost:1067/sample/defaultx.aspx?rnd=0.16709316722305073&filter=Category&id=3 i want to hide the...
0
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.